package cn.blackjuly.cadmin.controller;

import cn.blackjuly.cadmin.util.ServerUtil;
import com.jfinal.core.Controller;
import com.jfinal.kit.PathKit;
import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Record;

public class MgtController extends Controller {
    public void index() {
        render("index.jsp");
    }

    public void login() {
        render("login.jsp");
    }

    public void home() {
        setAttr("serverVersion", System.getProperty("os.name"));
        setAttr("serverInformation", ServerUtil.getServerName());
        setAttr("databaseVersion", "Mysql " + Db.findFirst("select version()").getStr("version()"));
        render("home.jsp");
    }
}
